<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>A Gentle Introduction</title>
    <script src="https://rawgit.com/flatiron/director/master/build/director.min.js">
    </script>
    <script>
    var author = function() {
        console.log("author");
    };
    var books = function() {
        console.log("books");
    };
    var viewBook = function(bookId) {
        console.log("viewBook: bookId is populated: " + bookId);
    };

    var routes = {
        '/author': author,
        '/books': [books, function() {
            console.log("An inline route handler.");
        },function () {
            console.log("1111111111.");
        }],
        '/books/view/:bookId': viewBook
    };

    var router = Router(routes);

    router.init();
    </script>
</head>

<body>
    <ul>
        <li><a href="#/author">#/author</a></li>
        <li><a href="#/books">#/books</a></li>
        <li><a href="#/books/view/1">#/books/view/1</a></li>
    </ul>
</body>

</html>
